package inter.controller;


import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;

import com.dingpeikeji.quickdeer.core.modules.orders.entity.TOrders;
import com.dingpeikeji.quickdeer.modules.rentproduct.service.RentproductInvoiceService;

import inter.model.ResultModel;
/**
 * 发送电子票接口
 * @author zijuan
 *
 */
@Controller
@RequestMapping(value = "api")
public class SendTicketController {
	@Autowired
	private RentproductInvoiceService rentproductInvoiceService;
	

	@RequestMapping(value = "sendTicket")
	public ResponseEntity<ResultModel> sendTicket(TOrders orders){
		if(rentproductInvoiceService.updateCheck(orders)){
		    return new ResponseEntity<ResultModel>(ResultModel.no("已开发票"), HttpStatus.OK);
		}else{
			return new ResponseEntity<ResultModel>(ResultModel.no("发票未开成功"), HttpStatus.OK);
		}

	}


}
